package 单链表翻转;

/**
 * Created by wangyg 
 * on 2017/7/14 15:10
 */
public class Creator {
	//创建一个链表数据
	public static Node create() {
		Node node = new Node();
		Node node1 = new Node();
		Node node2 = new Node();
		Node node3 = new Node();
		Node node4 = new Node();
		Node node5 = new Node();
		node.setData(0);
		node5.setData(5);
		node3.setData(3);
		node4.setData(4);

		node2.setData(2);
		node1.setData(1);

		node4.setNext(node5);
		node2.setNext(node3);
		node3.setNext(node4);
		node.setNext(node1);
		node1.setNext(node2);


		return node;
	}

	public static Node reverse(Node node) {
		if (node.getNext() == null) {
			return node;
		} else {
			Node node2 = node.getNext();

		}
		return null;
	}
}
